
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form id="upd_from" action="/allUser_updl" method="post">
    <input type="hidden" name="id" value="${t.col_Id}">
    用户名:<input name="uname" type="text" value="${t.col_Name}" readonly="readonly"><br>
    密码:<input id="pwd" name="pwd" type="password"><br>
    重复密码:<input id="repwd" name="repwd" type="password"><br>
    <input type="submit" value="确定">
</form>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script type="text/javascript">
    $("#upd_from").validate({
        rules:{
            pwd:{
                required:true,
                minlength: 3
            },
            repwd:{
                required:true,
                equalTo:"#pwd",
                minlength: 3
            },
        },
        messages: {
            pwd: {
                required: "请输入密码",
                minlength: "密码长度不能小于 5 个字母"
            },
            repwd: {
                required: "请输入密码",
                minlength: "密码长度不能小于 5 个字母",
                equalTo: "两次密码输入不一致"
            },

        },
        onkeyup:false,
        focusCleanup:true,
        onsubmit:true,
        submitHandler:function(form){
            alert("提交事件!");
            form.submit();
        }

    })

</script>



</body>
</html>
